package com.ogilvy.audi.model;

import javax.persistence.Column;
import javax.persistence.Embeddable;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import java.io.Serializable;
import java.util.Date;

/**
 * Created by IntelliJ IDEA.
 * User: wutl
 * Date: 2010-9-14
 * Time: 11:24:22
 * To change this template use File | Settings | File Templates.
 */
@Embeddable
public class GeneAttribute extends BaseObject implements Serializable {
    private String description;
    private Date createTime;
    private String creator;
    private Date lastUpdateTime;
    private String updater;


    @Column(length = 300,name="VC2DESCRIPTION")
    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }
    @Column(name = "DATCREATETIME", length =8)
	@Temporal(value= TemporalType.TIMESTAMP)
    public Date getCreateTime() {
         if(null==createTime)
           createTime=new Date();
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }
    @Column(length = 300,name="VC2CREATOR")
    public String getCreator() {
        return creator;
    }

    public void setCreator(String creator) {
        this.creator = creator;
    }
     @Column(name = "DATLASTUPDATETIME", length = 8)
	@Temporal(value= TemporalType.TIMESTAMP)
    public Date getLastUpdateTime() {
         lastUpdateTime=new Date();
        return lastUpdateTime;
    }

    public void setLastUpdateTime(Date lastUpdateTime) {
        this.lastUpdateTime = lastUpdateTime;
    }
    @Column(length = 300,name="VC2UPDATER")
    public String getUpdater() {
        return updater;
    }

    public void setUpdater(String updater) {
        this.updater = updater;
    }

    @Override
    public String toString() {
        return null;  //To change body of implemented methods use File | Settings | File Templates.
    }

    @Override
    public boolean equals(Object o) {
        return false;  //To change body of implemented methods use File | Settings | File Templates.
    }

    @Override
    public int hashCode() {
        return 0;  //To change body of implemented methods use File | Settings | File Templates.
    }
}
